/*
 * Copyright (c) 2018.
 * http://www.ulabcare.com
 */

package com.mt.roll.core.config;

import com.mt.roll.core.runner.MesApplicationRunner;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author jiff
 * @date 2018/11/1
 * @since 1.0
 */
@Configuration
@ComponentScan({"com.mt.roll.core.config", "com.mt.roll.core.handler", "com.mt.roll.core.dal.service", "com.mt.roll.core.service", "com.mt.roll.core.utils"})
public class AutoConfiguration {
    /**
     * springboot启动之后会调用{@link MesApplicationRunner#run(ApplicationArguments)}方法
     *
     * @param applicationContext
     * @return
     */
    @Bean
    public ApplicationRunner lisApplicationRunner(ApplicationContext applicationContext) {
        return new MesApplicationRunner(applicationContext);
    }
}
